﻿using System;
using System.Text;

namespace DataCoreTechnologies.Scribe.UI
{
    public class TreeNodeDocument: System.Windows.Forms.TreeNode
    {
        #region Public
        //Constructor
        //Properties
        /// <summary>
        /// Sets the TreeView image for this node
        /// </summary>
        public UI.TreeViewImage Image
        {
            set
            {
                ImageIndex = (int)Enum.Parse(typeof(UI.TreeViewImage), value.ToString());
                SelectedImageIndex = ImageIndex;
            }
        }
        //Methods
        /// <summary>
        /// Updates the image on this TreeView Node
        /// </summary>
        public void SetDatabaseCheckbox(Boolean shouldDocument)
        {
            if (shouldDocument)
            {
                ImageIndex = (int)Enum.Parse(typeof(UI.TreeViewImage), UI.TreeViewImage.CheckedBox.ToString());
                SelectedImageIndex = ImageIndex;
            }
            else
            {
                ImageIndex = (int)Enum.Parse(typeof(UI.TreeViewImage), UI.TreeViewImage.UncheckedBox.ToString());
                SelectedImageIndex = ImageIndex;
            }
        }
        #endregion
        #region Private
        #endregion
    }
}
